#include "head.h"

//     int id; 					    //航班班次
//     char flighttype[20] ;		//飞机机型
//     char startcity[20] ; 		//航班起点站
//     char arrivecity[20] ; 		//航班终点站
//     int starttime[2];  			//起飞时间 时:分
//     int arrivetime[2] ; 		    //到达时间 时:分
//     char flytime[20] ;			//飞行时间
//     int value ;  				//票价
//     int maxNUM ; 				//额定载客量
//     int leftbuyersa ; 			//剩余座位数量
//     char whetherfly  ;			//是否起飞 ‘y’ ‘n’

f_data data[7] =
    {
        {1, "Boeing737", "北京", "上海", {8, 30}, {10, 45}, "2小时15分", 800, 180, 180, 'n'},
        {2, "AirbusA320", "广州", "深圳", {9, 15}, {10, 00}, "45分钟", 400, 150, 140, 'n'},
        {3, "Boeing787", "成都", "重庆", {11, 00}, {11, 50}, "50分钟", 500, 220, 200, 'n'},
        {4, "AirbusA330", "南京", "杭州", {13, 30}, {14, 30}, "1小时", 600, 200, 200, 'n'},
        {5, "Boeing777", "上海", "北京", {15, 00}, {17, 10}, "2小时10分", 900, 240, 230, 'n'},
        {6, "AirbusA350", "深圳", "广州", {16, 45}, {17, 30}, "45分钟", 450, 160, 150, 'n'},
        {7, "Boeing747", "西安", "武汉", {19, 00}, {20, 20}, "1小时20分", 700, 300, 290, 'n'}};

f_user user_information[10] =
    {
        {.name = "huanhuan", .password = "0131", .IDcard = 0},
        {.name = "zhuzhu", .password = "0430", .IDcard = 4, .value = 1000},
        {.name = "huahua", .password = "0321", .IDcard = 3, .value = 900},
        {.name = "haha", .password = "0521", .IDcard = 2, .value = 800},
        {.name = "anne", .password = "0520", .IDcard = 1, .value = 700}};

void user_insert();
void flight_insert();

int main(int argc, char const *argv[])
{

    // 初始化操作
    FlightSystem Flight_Sys = Sys_init();
    // 进入登陆操作
    f_user user_data = Sys_log_in(Flight_Sys);

    // 进入菜单
    Sys_menu(&Flight_Sys, user_data);

    return 0;
}
